import {reqShopCart} from '@/api'
const actions = {
	async getShopCartList(miniStore){
		//请求购物车数据
		let result = await reqShopCart()
		if(result.code === 200){
			//若成功
			miniStore.commit('SAVE_SHOPCART_LIST',result.cartDetail)
		}else{
			//若失败
			alert(result.message)
		}
	}
}

const mutations = {
	SAVE_SHOPCART_LIST(state,list){
		state.cartDetail = list
	}
}

const state = {
	cartDetail:{
        recom_list:[
           
        ]
    }
}

const getters = {}

export default {
	actions,
	mutations,
	state,
	getters
}